home *** CD-ROM | disk | FTP | other *** search
/ Draw 3 / Draw 3.iso / AOL90 / COMP01.000 / %AFIXPATH% / 10094CNLUS.udp / out / afutil.js < prev    next >
Encoding:
JavaScript  |  2004-10-17  |  18.0 KB  |  570 lines

  1. // Auto Fix utilities
  2. // Copyright (c) GTek Technologies Ltd.
  3.  
  4. //======== Plugins are initialized on first call to getObj() method =====================
  5.  
  6. var g_oDiag = new ADPPlugin("Name=Diag,DllName=OSDiag,FuncName=GetOSDispatch");
  7. var g_oAol = new ADPPlugin("Name=Aol,DllName=AdpAol,FuncName=GetAdpAolDispatch");
  8. var g_oIni = new ADPPlugin("Name=Ini,DllName=Reg,FuncName=GetIniDispatch");
  9. var g_oReg = new ADPPlugin("Name=Reg,DllName=Reg,FuncName=GetRegDispatch");
  10. var g_oSys = new ADPPlugin("Name=Sys,DllName=AdpSys");
  11. var g_oProce = new ADPPlugin("Name=Proce,DllName=Proce,FuncName=GetProcessesDispatch");
  12.  
  13. var sFlowEvent = "";
  14. var sTriggerType = "";
  15. var bProbedClient = false; //was aol state checked (closed / open / closed / hidden)
  16.  
  17. //======== AF preparation parts =========================================================
  18.  
  19. function InitADP(oObject) {
  20.    g_oAdp = oObject;
  21.    g_hdrStr = "<table cellspacing=0 cellpadding=0 class='AdpHeaderTable'><tr><td><img src='../adpglobal/" + g_oAdp.Vars("sHeaderIcon") + "' ondrag='JavaScript:return false'  /></td></tr></table>";
  22.  
  23.    if (g_bCanBeAFCC) {
  24.       if (g_oIni.getObj().String("AdpData", "trigger", getIniPath()) == "") { // checks "who" was run the AF
  25.          sTriggerType = g_oAdp.EnvVar("RunGdp_source");
  26.  
  27.          if (sTriggerType == "AOLCoach") { // runs by PSA
  28.             g_oIni.getObj().String("AdpData", "trigger", getIniPath()) = sTriggerType;
  29.          } else {
  30.             sTriggerType = g_oAdp.EnvVar("GTDOWNENV_source");
  31.  
  32.             if (sTriggerType == "WebCyberCoach") { // runs by AOL Web CC
  33.                g_oIni.getObj().String("AdpData", "trigger", getIniPath()) = sTriggerType;
  34.                g_oAdp.Vars("RunAFCC") = "TRUE";
  35.             } else {
  36.                g_oIni.getObj().String("AdpData", "trigger", getIniPath()) = "non";
  37.                g_oAdp.Vars("RunAFCC") = "FALSE";
  38.             }
  39.          }
  40.       }
  41.    } else {
  42.       g_oAdp.Vars("RunAFCC") = "FALSE";
  43.    }
  44.  
  45.    if (g_oAdp.Vars("RunReboot") != "Reboot") {
  46.       g_oAdp.Vars("RunReboot") = g_oIni.getObj().String("AdpData", "result", getIniPath());
  47.       g_oAdp.Vars("nBootStepIndex") = g_oIni.getObj().String("AdpData", "step_index", getIniPath());
  48.    }
  49.    
  50.    adjustGUI();
  51.          
  52.    if (g_oAdp.Vars("RunLangFlow") == "TRUE") {
  53.        if ((g_oAdp.Vars("RunReboot") == "Reboot") && (g_oAdp.Vars("CurrentADP") != "goEndAF")) { // AF after reboot
  54.            g_oAdp.ADPID = g_sADPID;
  55.          g_oAdp.HasCloseButton = true;
  56.             setVisualStatus(true, true);
  57.             
  58.             goFlow();
  59.       } else {
  60.             runAF();
  61.         }
  62.    } else {
  63.       g_oAdp.Vars("RunLangFlow") = "TRUE";
  64.       
  65.       if (g_oAdp.Vars("RunReboot") == "Reboot") // AF after reboot
  66.             setUS_EU("main.htm", "main_eu.htm");
  67.       else
  68.             setUS_EU("start.htm", "start_eu.htm");
  69.    }
  70. }
  71.  
  72. function getLangPSA() {
  73.    sCmnAppDtPath = "Software\\Microsoft\\Windows\\CurrentVersion\\explorer\\Shell Folders";
  74.    sCmnAppDtPath = g_oReg.getObj().String("Current", sCmnAppDtPath, "AppData");
  75.    sCfgPath = sCmnAppDtPath + "\\GTek\\GTUpdate\\AUpdate\\AOLCC\\AUCommon.cfg";
  76.    sCurrentLang = g_oIni.getObj().String("Channels", "Language", sCfgPath);
  77.  
  78.    if (sCurrentLang == "Spanish") {
  79.       g_oAdp.Vars("StartHtm") = "start_eu.htm";
  80.       g_oAdp.Vars("sHeaderIcon") = "bg_icon_eu.gif";
  81.       return "eu";
  82.    } else {
  83.       return "us";
  84.    }
  85. }
  86.  
  87. function setUS_EU(sHtmPageUS, sHtmPageEU) {
  88.    g_oAdp.Vars("StartHtm") = "start.htm";
  89.  
  90.    if (g_oAdp.Vars("sHeaderIcon") == "")
  91.       g_oAdp.Vars("sHeaderIcon") = "bg_icon_" + getLangID("sign").substring(0,2) + ".gif";
  92.  
  93.    if ((g_bCanBeAFCC) && (g_oIni.getObj().String("AdpData", "trigger", getIniPath()) == "AOLCoach")) { // runs by PSA
  94.       if (getLangPSA() == "us")
  95.          window.location.replace(sHtmPageUS);
  96.       else
  97.          window.location.replace(sHtmPageEU);
  98.  
  99.       return;
  100.    }
  101.  
  102.    if (g_bRunUS_EU) {
  103.       var sAolBuild = g_oAol.getObj().AolMajor;
  104.  
  105.       if (sAolBuild >= "4148") {
  106.          var sAolLang = g_oAol.getObj().AolLanguage;
  107.  
  108.          if (sAolLang.match(/0|us/i)) {
  109.             window.location.replace(sHtmPageUS);
  110.          } else {               // "eu"
  111.             g_oAdp.Vars("StartHtm") = "start_eu.htm";
  112.             g_oAdp.Vars("sHeaderIcon") = "bg_icon_eu.gif";
  113.                                        
  114.             window.location.replace(sHtmPageEU);
  115.          }
  116.       } else {
  117.          window.location.replace(sHtmPageUS);
  118.       }
  119.    } else {
  120.       window.location.replace(sHtmPageUS);
  121.    }
  122.  
  123.    return;
  124. }
  125.  
  126. function setFirstStepVisStatus() {
  127.    if (g_oAdp.Vars("FirstFlowStepRun") != "TRUE") {
  128.       g_oAdp.Vars("FirstFlowStepRun") = "TRUE";
  129.       setVisualStatus(g_bFirstStepVisible, true);
  130.    }
  131. }
  132.  
  133. function runAF() {
  134.    if ((g_oAdp.Vars("RunIntro") == "TRUE") || (g_oAdp.Vars("RunReboot") == "Reboot")) {
  135.       setFirstStepVisStatus();
  136.              
  137.       if (g_oAdp.Vars("CurrentADP") == "goEndAF")
  138.          goEndAF();
  139.       else
  140.          goFlow();
  141.    } else {
  142.       g_oAdp.Vars("currentStep") = 0; // sets First Flow Step 
  143.       g_oAdp.Vars("RunIntro") = "TRUE";
  144.       g_oAdp.ADPID = g_sADPID;
  145.       g_oAdp.HasCloseButton = true;
  146.       
  147.       if (!isLangSupported()) {
  148.          msgElement = document.getElementById("idNotLangSupport" + (getLangID("sign").substring(0,2)).toUpperCase());
  149.          setVisualStatus(true, true);
  150.          showScreen(msgElement, {idBtnClose: closeAdp});
  151.          return;
  152.       }
  153.       
  154.       if (checkEnvironment() && checkScreenRes() && checkAcsVer() && preCondition_Extra())
  155.          goIntro();
  156.    }
  157. }
  158.  
  159. function checkEnvironment() {
  160.    var sOS = g_oDiag.getObj().GetOSString();
  161.  
  162.    if (g_bWin2kOnly) { // shows message if operating system is not supported 
  163.       if (!sOS.match(/Win2000|WinXP/i)) {
  164.          goExitAF("idNotOS");
  165.          return false;
  166.       } 
  167.    } else {
  168.       if (!sOS.match(/Win98|Win98SE|WinME|Win2000|WinXP/i)) {
  169.          goExitAF("idNotOS");
  170.          return false;
  171.       } 
  172.    }
  173.    
  174.    if(isScreenReader()) {
  175.       goExitAF("idReaderEnabled");
  176.       return false;
  177.    }
  178.   
  179.    if (sOS.match(/Win2000|WinXP/i)) { // shows message if user has no administrative rights
  180.       var bAdmin = g_oDiag.getObj().IsAdmin();
  181.  
  182.       if (!bAdmin) {
  183.          goExitAF("idNotAdmin");
  184.          return false;
  185.       }
  186.    } 
  187.  
  188.    if (g_sAolVer != "FALSE") { // shows message if no required AOL version installed
  189.       if (g_sAolVer.length > 3) // AOL Major build ver. like AOL 9: "4124.10036"
  190.          sAolVersion = g_oAol.getObj().AolMajor;
  191.       else                      // AOL ver. like AOL 6, AOL 7 ...
  192.          sAolVersion = g_oAol.getObj().Version;
  193.   
  194.       if (sAolVersion != g_sAolVer) {
  195.          goExitAF("idNotAol");
  196.          return false;
  197.       }
  198.    }
  199.  
  200.    return true;
  201. }
  202.  
  203. function isScreenReader() {
  204.       g_oProce.getObj().Refresh;
  205.                      
  206.       // loop through the process list
  207.       for (a=0; a<g_oProce.getObj().Count; a++) {
  208.          sCurrentProcess = g_oProce.getObj().Process(a);
  209.          if (sCurrentProcess.LongBaseName().toLowerCase().match(/jfw.exe|wineyes.exe|narrator.exe/i)) // is screen reader process
  210.             return true;
  211.       }
  212.       
  213.    return false;
  214. }
  215.  
  216. function checkScreenRes() {
  217.    if (g_bScreenRes) { 
  218.       if ((screen.width < 800) || (screen.height < 600)) { // minimum resolution is 800X600
  219.          goExitAF("idNotScreenRes");
  220.          return false;
  221.        }
  222.       
  223.       if (screen.colorDepth < 16) { // minimum color depth is 16 bit
  224.          goExitAF("idNotScreenRes");
  225.          return false;
  226.       }
  227.    }
  228.    
  229.    return true;
  230. }
  231.  
  232. function checkAcsVer() {
  233.    if (g_nAcsVer != false) {
  234.       if (g_oReg.getObj().IsRegValue("Local", "Software\\America Online\\Acs", "VersionMajor")) {
  235.          if (g_oReg.getObj().Long("Local","Software\\America Online\\Acs","VersionMajor") >= g_nAcsVer) {
  236.             return true;
  237.          } else {
  238.               goExitAF("idNotAOL");
  239.             return false;
  240.           }
  241.       } else {
  242.           goExitAF("idNotAOL");
  243.           return false;
  244.       }
  245.    }
  246.    
  247.    return true;
  248. }  
  249.  
  250. function setVisualStatus(bVisible, bTopMost) {
  251.    if (bVisible)
  252.       g_oAdp.Visible = true;
  253.    else
  254.       g_oAdp.Visible = false;
  255.    
  256.    if (bTopMost)
  257.       g_oAdp.TopMost = true;
  258.    else
  259.       g_oAdp.TopMost = false;
  260. }
  261.  
  262. function getIniPath() {
  263.    return g_oAdp.ChangeString(g_sCoachOSAppData) + "\\AdpData.acd";
  264. }  
  265.  
  266. function completeFix() {
  267.    g_oIni.getObj().String("AdpData", "stage", getIniPath()) = "";
  268.    g_oIni.getObj().String("AdpData", "result", getIniPath()) = "";
  269.    g_oIni.getObj().String("AdpData", "current", getIniPath()) = "";
  270.    g_oIni.getObj().String("AdpData", "trigger", getIniPath()) = "";
  271.    g_oIni.getObj().String("AdpData", "error_data", getIniPath()) = "";
  272.    g_oIni.getObj().String("AdpData", "step_index", getIniPath()) = "";
  273.  
  274.    sPath = g_oAdp.ChangeString("%startup%") + "\\" + g_sADPID + g_sExtension + ".lnk";
  275.    bRes = g_oAol.getObj().CopyFile(sPath,"DELETE FILE",false);
  276. }  
  277.  
  278. function restartFix() {
  279.    g_oAdp.Vars("FirstFlowStepRun") = "FALSE";
  280.  
  281.    if (document.location.href.indexOf("start") > 0) { // "start.htm" or "start_eu.htm" exists in the path
  282.       goIntro();
  283.    } else {
  284.       g_oAdp.Vars("RunIntro") = "FALSE";
  285.       window.location.replace(g_oAdp.Vars("StartHtm"));
  286.    }
  287. }  
  288.  
  289. function goExitAF(sScreenID) {    
  290.    sTriggerType = g_oIni.getObj().String("AdpData", "trigger", getIniPath());
  291.    
  292.    if (g_oAdp.Vars("RunAFCC") == "TRUE") { // Computer CheckUp or PSA (after reboot) AFs
  293.       sActiveSpan = document.getElementById("idMsgRecheck");
  294.       sCmdShow = "showScreen(idRecheck, {idBtnRecheck: goRecheck, idBtnClose: closeAdp})";
  295.    } else {
  296.       sActiveSpan = document.getElementById("idMsgFixed");
  297.       sCmdShow = "showScreen(idFixed, {idBtnClose: closeAdp})";
  298.    }
  299.  
  300.    sActiveSpan.innerHTML = getDsoMsg(sScreenID);
  301.  
  302.    completeFix();
  303.    setVisualStatus(true, true);
  304.    eval(sCmdShow);
  305.    return;
  306. }
  307.  
  308. function getDsoMsg(msgId) {
  309.    if (isCurrentEU())
  310.       dsoPath = formatFilePath(document.location.pathname, "afdata_eu.dso");
  311.    else
  312.       dsoPath = formatFilePath(document.location.pathname, "afdata.dso");
  313.          
  314.    dsoPath = dsoPath.replace(/%20/g," ");
  315.    dsoPath = g_oAdp.LongPathToShort(dsoPath);
  316.       
  317.    return g_oIni.getObj().String("dso_data", msgId, dsoPath);
  318. }
  319.  
  320. function chkExitWay() {
  321.    if (g_oAdp.Vars("RunAFCC") == "TRUE") { // Computer CheckUp AFs
  322.       goEndAF();
  323.    } else {
  324.       completeFix();
  325.       closeAdp();
  326.    }
  327. }
  328.  
  329. function goIntro(bSysTray) {
  330.    goCheckCloseAOL_Extra();
  331.    
  332.    if (g_bRunIntro) {
  333.       if (bProbedClient) {
  334.          g_oAdp.Vars("CurrentADP") = "goIntro";
  335.          setVisualStatus(true, true);
  336.          
  337.          if (isBrowserOpen() && !bSysTray)
  338.             showScreen(idIntroAol, {idBtnCancel: chkExitWay, idBtnContinue: goCheckCloseAOL});
  339.          else
  340.             showScreen(idIntro, {idBtnCancel: chkExitWay, idBtnContinue: goCheckCloseAOL});
  341.       } else {
  342.          probeAolClient();
  343.          return;
  344.       } 
  345.       
  346.    } else {
  347.       goCheckCloseAOL();
  348.    }
  349. }
  350.  
  351. function goCheckCloseAOL() {
  352.    sendStat("Start");
  353.    
  354.    if (g_bRunCloseAOL)
  355.       initCloseAOL();
  356.    else
  357.       navigateFlow();
  358. }
  359.  
  360. function navigateFlow() {
  361.    setUS_EU("main.htm", "main_eu.htm");
  362.  
  363. function isBrowserOpen(){
  364.    if (g_bRunCloseAOL && (g_oAol.getObj().IsAolBrowserOpen() || g_oSys.getObj().FindChildWindow("AOL Frame25","*")))
  365.       return true;
  366.    else
  367.       return false;
  368. }
  369.  
  370. function probeAolClient() {
  371.    bProbedClient = true;
  372.    
  373.    if (g_bRunCloseAOL) {
  374.    
  375.        //switch to init screen
  376.       dispUtil.setMsg("idCloseAOLWait3");
  377.       setVisualStatus(true, true);
  378.       document.all.ProgressBarContainer.style.top = "180";
  379.       showScreen(idCloseAOLWait, {idBtnClose: dispUtil.goAbortRetry});
  380.       
  381.       if (!bAbortedClose)
  382.          idCloseAOLWait.all.idBtnClose.style.display = "none";   
  383.    
  384.       g_oSys.getObj().WaitForChildWindowCloseOrUnVisible("AOL_INTRO","_AOL_Toolbar","",1000);
  385.    } else {
  386.       goIntro(false);
  387.    }
  388. }
  389.  
  390. function isCurrentEU() {
  391.    if (g_oAdp.Vars("StartHtm").match(/eu/i) != null)
  392.       return true;
  393.    else
  394.       return false;
  395. }
  396.  
  397. function sendStat(sStatID) {
  398.    if (sStatID == "Start")
  399.       g_oAdp.Vars("StatWasSent") = "FALSE";
  400.  
  401.    if (g_oAdp.Vars("StatWasSent") != "TRUE") { // == "FALSE" protection after Reboot
  402.       if (sStatID != "Start")
  403.          sErrorDesc = ',"Extra=' + g_oIni.getObj().String("AdpData", "error_data", getIniPath()) + '"'; 
  404.       else
  405.          sErrorDesc = "";
  406.  
  407.       if (sStatID == "End")
  408.          g_oAdp.Vars("ReturnCodeFixed") = "TRUE"; // g_oAdp.ReturnCode = 0;
  409.  
  410.       bStatWasSent = g_oAol.getObj().NotifyServer(g_sADPstatID, sStatID, sErrorDesc);
  411.  
  412.       if (sStatID != "Start")
  413.          g_oAdp.Vars("StatWasSent") = "TRUE";
  414.    }
  415. }
  416.  
  417. function formatFilePath(sPath, sCurrentFile) { // gets physical File path (customized for URL string)
  418.    pStart = sPath.indexOf("/") + 1;
  419.     pEnd = sPath.lastIndexOf("\\");
  420.    sFormatPath = sPath.substring(pStart, pEnd);
  421.    return sFormatPath + "\\" + sCurrentFile;
  422. }
  423.  
  424. function prepShutDown(nStepAfterBoot) {
  425.    if (g_oAdp.MyName.indexOf("aolshare\\coach-Local\\" + g_sADPID + g_sExtension) < 0) {
  426.         afPath = g_oAdp.ChangeString("%currentappdir%\\") + "local\\" + g_sADPID + g_sExtension;
  427.         g_oAol.getObj().CopyFile(g_oAdp.MyName ,afPath ,false);
  428.     }
  429.     
  430.     if (nStepAfterBoot > 0)
  431.       g_oIni.getObj().String("AdpData", "step_index", getIniPath()) = nStepAfterBoot.toString();
  432.            
  433.    g_oIni.getObj().String("AdpData", "current", getIniPath()) = g_sADPID + g_sExtension;
  434. }
  435.  
  436. function parseKey(str,key) {
  437. // returns "str" part starting from "key" and ending by first "&" OR
  438. // returns "" if "key" is not found in "str" OR
  439. // returns "str" part starting from "key" and ending by the end of "str" if no "&" in the "str" 
  440.  
  441.    if (str.indexOf(key) < 0) 
  442.       return('');
  443.  
  444.    if (str.substring(str.indexOf(key)).indexOf('&') > -1) 
  445.       return(str.substring(str.indexOf(key)+key.length,str.substring(str.indexOf(key)).indexOf('&')+str.indexOf(key)));
  446.    else 
  447.       return(str.substring(str.indexOf(key)+key.length));
  448. }
  449.  
  450. function getLangID(type) { // types can be set to sign / index
  451.    sLangIndex = g_oAol.getObj().OsLanguage.toString();
  452.    sLangName = g_oIni.getObj().String("OsLanguage", sLangIndex, g_oAdp.LongPathToShort(g_oAdp.ChangeString("%currentappdir%") + "\\player\\language\\Language.src"));
  453.     
  454.    if (type == "index")
  455.       return ((sLangIndex == "")? "9-NS" : sLangIndex); // -NS means not supported (by default us)
  456.    else
  457.       return ((sLangName == "")? "us-NS" : sLangName);
  458. }
  459.  
  460. function getAcpLang() {
  461.    sAcpDir = g_oAdp.ChangeString("%currentappdir%");
  462.    sAcpLang = sAcpDir.substring(sAcpDir.lastIndexOf("\\") + 1, sAcpDir.length);
  463.    sAcpLang = sAcpLang.substring(sAcpLang.indexOf("_") + 1, sAcpLang.length);
  464.    
  465.    return sAcpLang;
  466. }
  467.  
  468. function isLangSupported() {
  469.    sAcpLang = getAcpLang();
  470.    sOsLang = getLangID("sign");
  471.  
  472.    var langMatch = new Array(4);
  473.    langMatch[0] = "10,en,us";
  474.    langMatch[1] = "13,en,us";
  475.    langMatch[2] = "14,uk,us";
  476.    langMatch[3] = "15,fr,fr";
  477.    langMatch[4] = "16,de,de";
  478.    
  479.    currSettings = g_sLangID + "," + sAcpLang + "," + sOsLang;
  480.    
  481.    for (l=0;l<langMatch.length;l++) {
  482.       if (langMatch[l].toLowerCase() == currSettings.toLowerCase())
  483.          return true;
  484.    }
  485.    
  486.    return false;
  487. }
  488.  
  489. function goRecheckPSA() {
  490.    sRegPSA = "Software\\GTek\\GTUpdate\\AOLCC";
  491.  
  492.    sCfgPath = g_oReg.getObj().String("Local", sRegPSA, "CfgPath");
  493.    sCmdLineCenter = g_oIni.getObj().String("General", "CmdLineCenter", sCfgPath);
  494.    sACCBrwsPath = sCfgPath.substring(0, sCfgPath.lastIndexOf("\\"));
  495.    sCmdLineCenter = sCmdLineCenter.substring(sCmdLineCenter.lastIndexOf(" "), sCmdLineCenter.length);
  496.  
  497.    bResLaunch = g_oAdp.Launch(sACCBrwsPath+"\\ACCBrws.exe", sCmdLineCenter, sACCBrwsPath, -2);
  498. }
  499.  
  500. function launchWAOL(sCmdLine) {
  501.    if (arguments.length == 0) // allows send launchWAOL(); => without argument
  502.       sCmdLine = "";
  503.  
  504.    sPath = g_oAdp.ChangeString("%windows%") + "\\Win.ini";
  505.    sAOL = g_oIni.getObj().String("WAOL", "AppPath", sPath);
  506.    sExeAOL = g_oAdp.LongPathToShort(sAOL) + "\\waol.exe";
  507.    
  508.    g_oAdp.Launch(sExeAOL, sCmdLine, sAOL, -2);
  509. }
  510.  
  511. function goRecheckCC() {
  512.    sURL = '-u"' + 'aol://4344:2452.CC_URL2.26186256.728938064' + '/"';
  513.    launchWAOL(sURL);
  514. }
  515.  
  516. function goRecheck() {
  517.    if (sTriggerType == "AOLCoach") // AF was run by PSA
  518.       goRecheckPSA();
  519.    else
  520.       goRecheckCC();
  521.  
  522.    closeAdp();
  523. }
  524.  
  525. function goEndAF() {
  526.    if (g_oAdp.Vars("CurrentADP") != "goEndAF") {
  527.       g_oAdp.Vars("CurrentADP") = "goEndAF";
  528.       window.location.replace(g_oAdp.Vars("StartHtm"));
  529.    } else {
  530.       sFlowEvent = parseKey(location.search,"msgId="); // checks for flow message cmd.
  531.  
  532.       if (sFlowEvent != "") {
  533.          goExitAF(sFlowEvent);
  534.          return;
  535.       }
  536.  
  537.       if (((g_bCanBeAFCC) && (g_oIni.getObj().String("AdpData", "trigger", getIniPath()) == "AOLCoach") && (g_oAdp.Vars("RunReboot") == "Reboot")) || ((g_oIni.getObj().String("AdpData", "trigger", getIniPath()) == "WebCyberCoach") && (g_bCanBeAFCC))) { // AF was run by PSA or CC
  538.          g_oAdp.Vars("RunAFCC") = "TRUE"; // PSA => like CC AFs - will includes the "Recheck" button
  539.          goExitAF("idRecheck");
  540.          return;
  541.       }
  542.  
  543.       completeFix();
  544.       setVisualStatus(true, true);
  545.  
  546.       if (g_oAdp.Vars("RunAFCC") == "TRUE") // Computer CheckUp AFs
  547.          showScreen(idRecheck, {idBtnRecheck: goRecheck, idBtnClose: closeAdp});
  548.       else
  549.          showScreen(idFixed, {idBtnClose: closeAdp});
  550.    }
  551. }
  552.  
  553. function preCondition_Extra() { // Term to run / exit AF on start; return true = run, return false = exit
  554.    try {
  555.       bRes = eval(g_sPreCond);
  556.       return bRes;
  557.    } catch(e) {
  558. //      alert(e.description); // for debugging
  559.       return true;
  560.    }
  561. }
  562.  
  563. function goCheckCloseAOL_Extra() { // Simple execution, no return code required
  564.    try {
  565.       eval(g_sPreCondAOL);
  566.    } catch(e) {
  567. //      alert(e.description); // for debugging
  568.    }
  569. }